include_directories(${BarterServer_SOURCE_DIR}/tests)
add_library(DatabaseTest0 MODULE TestBase DatabaseTest0 ../../src/DBQuery)
add_library(DatabaseTest1 MODULE TestBase DatabaseTest1 ../../src/DBQuery)
add_library(DatabaseTest2 MODULE TestBase DatabaseTest2 ../../src/DBQuery)
add_library(DatabaseTest3 MODULE TestBase DatabaseTest3 ../../src/DBQuery)
add_library(DatabaseTest4 MODULE TestBase DatabaseTest4 ../../src/DBQuery)
add_library(DatabaseTest5 MODULE TestBase DatabaseTest5 ../../src/DBQuery)
add_library(DatabaseTest6 MODULE TestBase DatabaseTest6 ../../src/DBQuery)
add_library(SQLiteDatabaseDriverTest0 MODULE TestBase SQLiteDatabaseDriverTest0 ../../src/sqlite3 ../../src/SQLiteDatabaseDriver ../../src/DBQuery)
add_library(SQLiteDatabaseDriverTest1 MODULE TestBase SQLiteDatabaseDriverTest1 ../../src/sqlite3 ../../src/SQLiteDatabaseDriver ../../src/DBQuery)
add_library(ConfigTest0 MODULE TestBase ConfigTest0 ../../src/Config)
add_library(ConfigTest1 MODULE TestBase ConfigTest1 ../../src/Config)
add_library(NetworkMessageTest0 MODULE TestBase NetworkMessageTest0 ../../src/NetworkMessage)
add_library(NetworkMessageTest1 MODULE TestBase NetworkMessageTest1 ../../src/NetworkMessage)
add_library(NetworkMessageTest2 MODULE TestBase NetworkMessageTest2 ../../src/NetworkMessage)
add_library(CryptoSystemTest0 MODULE TestBase CryptoSystemTest0 ../../src/AES)
add_library(CryptoSystemTest1 MODULE TestBase CryptoSystemTest1 ../../src/SHA512)
add_library(CryptoSystemTest2 MODULE TestBase CryptoSystemTest2 ../../src/SHA512)
add_library(CryptoSystemTest3 MODULE TestBase CryptoSystemTest3 ../../src/AES)
add_library(CryptoSystemTest4 MODULE TestBase CryptoSystemTest4 ../../src/AES ../../src/Config ../../src/CryptoSystem ../../src/NetworkMessage ../../src/SHA512)
add_custom_command(TARGET SQLiteDatabaseDriverTest0 POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${BarterServer_SOURCE_DIR}/tests/TestModules/SQLiteDatabaseDriverTest0.sql ${BarterServer_BINARY_DIR}/tests/TestModules/SQLiteDatabaseDriverTest0.sql)
add_custom_command(TARGET SQLiteDatabaseDriverTest1 POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${BarterServer_SOURCE_DIR}/tests/TestModules/SQLiteDatabaseDriverTest1.sql ${BarterServer_BINARY_DIR}/tests/TestModules/SQLiteDatabaseDriverTest1.sql)
add_custom_command(TARGET ConfigTest0 POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${BarterServer_SOURCE_DIR}/tests/TestModules/ConfigTest0.conf ${BarterServer_BINARY_DIR}/tests/TestModules/ConfigTest0.conf)
add_custom_command(TARGET ConfigTest1 POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${BarterServer_SOURCE_DIR}/tests/TestModules/ConfigTest1.conf ${BarterServer_BINARY_DIR}/tests/TestModules/ConfigTest1.conf)
add_custom_command(TARGET CryptoSystemTest4 POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${BarterServer_SOURCE_DIR}/tests/TestModules/CryptoSystemTest4.conf ${BarterServer_BINARY_DIR}/tests/TestModules/CryptoSystemTest4.conf)
add_custom_command(TARGET CryptoSystemTest4 POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${BarterServer_SOURCE_DIR}/tests/TestModules/CryptoSystemTest4.key ${BarterServer_BINARY_DIR}/tests/TestModules/CryptoSystemTest4.key)